package com.ymatou.iapi.csim.service;

import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.ymatou.iapi.csim.parameter.GetAllOnlinecsList;
import com.ymatou.iapi.csim.parameter.GetHistorySessionListResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.database.model.ymt_onlinecs;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取所有客服Call
*FreeMaker Template自动生成代码
*/
public class GetAllCall extends YmatouBaseCall{
	private static String opurl ="api/cs/GetAll";
	
	public GetAllCall() {
		super(EnvSetup.getSystemUrl("csim_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		//client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	 public String getStatus()
	 {
	        return getString("Status");
	 }
	 public String getMsg()
	 {
	        return getString("Msg");
	 }
	
	public GetAllOnlinecsList getResult()
	 {
		//return new JSONArray(DataUtil.Json.parseJsonObj(getString("Result")));
		
		return (GetAllOnlinecsList)FormatUtil.GSONToObject(DataUtil.Json.parseJsonObj(this.getReturnData()).toString(), GetAllOnlinecsList.class);

	 }
}